<template name="Recipe">
  <article class="recipe {{#if inMenu}}in-menu{{/if}}">
    <h3>{{name}}</h3>

    {{#if editMode}}
      {{> quickForm collection="Recipes" id=updateRecipeId type="update" doc=this  autosave=true}}
    {{else}}
      <p>{{desc}}</p>
      <p>
        {{#each ingredients}}
          <span class="ingredient">{{name}} - {{amount}}</span>
        {{/each}}
      </p>
      <a href="/recipes/{{_id}}">查看</a>
      {{#if inMenu}}
        <button class="btn-deny toggle-menu">删除</button>
      {{else}}
        <button class="btn-primary toggle-menu">添加</button>
      {{/if}}
    {{/if}}

    <i class="fa fa-pencil"></i>
    <i class="fa fa-trash"></i>
  </article>
</template>